package com.hjxy.codetools.service;

import com.hjxy.codetools.dao.TuserMapper;
import com.hjxy.codetools.interfa.TuserServiceInterface;
import com.hjxy.codetools.model.TuserModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Service
@Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
public class TuserService implements TuserServiceInterface {

    @Autowired
    TuserMapper tuserMapper;
    @Override
    public List<TuserModel> getTuserByItem(Map map) throws Exception {

        return tuserMapper.getTuserByItem(map);
    }

    @Override
    public int insertTuser(TuserModel tuserModel) throws Exception {
        return tuserMapper.insertTuser(tuserModel);
    }
}
